extends layout
block content
  //if (doc_name)
  //  h1=doc_name
  //else
  //  h1='文档预览'

  each page in pages
    if (page.thumb_s)
      - var imgParam = '?imageView2/0/w/960/h/540'
      - if (platform == "desktop") imgParam = '?imageView2/0/w/1600/h/900'
      img(id='img'+page.page_index src=page.thumb_s + imgParam
            style="border:1px solid black;margin-bottom:12px;width:100%")
    else
      img(id='img'+page.page_index alt='第 '+(page.page_index+1)+' 页'
          style="border:1px solid black;margin-bottom:12px;width:30%")
      br

  br
  //img(src='http://7xogoq.com1.z0.glb.clouddn.com/itbserver/api/img/QRCode_app_t.png' style='width:90%;min-width:200px;margin:25px 0 15px 0;' onclick="onClickApp()")
  - var downloadUrl = 'http://www.itbour.com/min/download/download.html'
  div.img_foot
    a(href='#')
      img(src="/images/foot_01.png")
    h2='一键生成'
    div.foot_spanp
      span='从此'
      span.foot_spanptwo='制作PPT只需要5分钟'

  div.fix
    div.fix_main
      div.fix_left
        a(href='#')
          img(src="/images/logo_01.png")
      div.fix_center
        div.fix_centerfirst
          h2.fix_first='一键生成'
          h2.fix_two='自动排版设计'
        div.fix_centertwo
          span.fix_three='前往下载'
          span.fix_four='制作PPT只需5分钟'
          span.fix_five='>'
      div.fix_right
        a(href=downloadUrl)='前往下载'
  br
  br
  br

  script(src='http://7xogoq.com1.z0.glb.clouddn.com/itbserver/api/js/jquery-1.11.0.min.js')
  script(src='http://7xogoq.com1.z0.glb.clouddn.com/itbserver/api/js/jweixin-1.0.0.js')
  script(type='text/javascript').
    var gAPIHOST = '#{api_host}';
    var gShareIcon ='http://7xogoq.com1.z0.glb.clouddn.com/itbserver/api/img/logo60-3X.png';
    var gImg0 = document.getElementById('img0');
    if (gImg0) {
      gShareIcon = gImg0.src;
    }
    var gMyParam = !{myParam};
    var gItbGifSrc = gMyParam.pImg;
    var gWechat = !{wechat};
    var gURL = gWechat.link;
    wx.config({
      debug: false,
      appId: gWechat.appId,
      timestamp: gWechat.timestamp,
      nonceStr: gWechat.nonceStr,
      signature: gWechat.signature,
      jsApiList: [
        //'checkJsApi',
        'onMenuShareTimeline',
        'onMenuShareAppMessage'
      ]
    });
  script(src='/javascripts/indexDoc.js')
  script(src='/javascripts/itbgif.js')